From: kfraser@localhost.localdomain Date: Thu, 30 Aug 2007 14:35:10 +0000 (+0100) Subject: qemu: Remove mapcache lock - we no longer have multiple threads in core qemu code. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14987^2~42 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=6236121d5fa8d836601febaf12bf4b26563ca06f;p=xen.git qemu: Remove mapcache lock - we no longer have multiple threads in core qemu code. Signed-off-by: Keir Fraser --- diff --git a/tools/ioemu/Makefile.target b/tools/ioemu/Makefile.target index 6d11dea8e4..33773a4929 100644 --- a/tools/ioemu/Makefile.target +++ b/tools/ioemu/Makefile.target @@ -197,7 +197,6 @@ CPPFLAGS+=-D_GNU_SOURCE LIBS+=-lm LIBS+=-L../../libxc -lxenctrl -lxenguest LIBS+=-L../../xenstore -lxenstore -LIBS+=-lpthread ifndef CONFIG_USER_ONLY LIBS+=-lz endif diff --git a/tools/ioemu/target-i386-dm/exec-dm.c b/tools/ioemu/target-i386-dm/exec-dm.c index 0655eaaa2f..b67c55414d 100644 --- a/tools/ioemu/target-i386-dm/exec-dm.c +++ b/tools/ioemu/target-i386-dm/exec-dm.c @@ -125,17 +125,10 @@ static int io_mem_nb = 1; FILE *logfile; int loglevel; -#ifdef MAPCACHE -pthread_mutex_t mapcache_mutex; -#endif - void cpu_exec_init(CPUState *env) { CPUState **penv; int cpu_index; -#ifdef MAPCACHE - pthread_mutexattr_t mxattr; -#endif env->next_cpu = NULL; penv = &first_cpu; @@ -149,14 +142,6 @@ void cpu_exec_init(CPUState *env) /* alloc dirty bits array */ phys_ram_dirty = qemu_malloc(phys_ram_size >> TARGET_PAGE_BITS); - -#ifdef MAPCACHE - /* setup memory access mutex to protect mapcache */ - pthread_mutexattr_init(&mxattr); - pthread_mutexattr_settype(&mxattr, PTHREAD_MUTEX_RECURSIVE); - pthread_mutex_init(&mapcache_mutex, &mxattr); - pthread_mutexattr_destroy(&mxattr); -#endif } /* enable or disable low levels log */ diff --git a/tools/ioemu/vl.h b/tools/ioemu/vl.h index 80b88a50a4..dda595b480 100644 --- a/tools/ioemu/vl.h +++ b/tools/ioemu/vl.h @@ -160,26 +160,16 @@ extern FILE *logfile; #if defined(__i386__) || defined(__x86_64__) - #define MAPCACHE - uint8_t *qemu_map_cache(target_phys_addr_t phys_addr); void qemu_invalidate_map_cache(void); - -#include -extern pthread_mutex_t mapcache_mutex; -#define mapcache_lock() pthread_mutex_lock(&mapcache_mutex) -#define mapcache_unlock() pthread_mutex_unlock(&mapcache_mutex) - #else - #define qemu_invalidate_map_cache() ((void)0) +#endif #define mapcache_lock() ((void)0) #define mapcache_unlock() ((void)0) -#endif - extern int xc_handle; extern int domid;